package cn.mfox.server.config;

import org.hibernate.dialect.PostgreSQL10Dialect;
import org.hibernate.type.descriptor.sql.LongVarcharTypeDescriptor;
import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;
import org.springframework.stereotype.Component;

/**
 * @author Raoyh
 * @Description
 * @create 2023-09-27 15:10
 */
@Component
public class MyPowerJobPGDialect extends PostgreSQL10Dialect {
    public MyPowerJobPGDialect() {
    }

    @Override
    public SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) {
        System.out.println("1111111111111111111111111" + sqlCode);
        return 2005 == sqlCode ? LongVarcharTypeDescriptor.INSTANCE : null;
    }
}
